<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title> 数据类型</title>
</head>

<body>
    <div><button id="test"> 测试</button></div>
    <script>
        document.getElementById("test").onclick = function () {
            // easyType();
            complex();
        }
        function easyType() {
            let num1 = 10
            let num2 = num1
            num2 = 20
            console.log(num1)
        }
        function complex() {
            let num1 = {
                age: 29
            }
            let num2 = num1
            num2.age = 30
            console.log(num1)
        }
    </script>
</body>

</html>